/****************************************************************************/    
/* NAME:           fan.h                                                    */    
/* PURPOSE:        Leds pwm management                                      */    
/* CREATED_BY:     Vyx                                                      */    
/* CREATION_DATE:  30/05/2013                                               */    
/************************************** (C) Copyright 2013 AquaLink *********/ 

#include "main.h"

#ifndef _FAN_DEF_H
#define _FAN_DEF_H

typedef enum
{
    FAN_NO_ROLE,
    FAN_WATER,
    FAN_LIGHT
}FAN_SETPOINT_ROLE;

typedef struct
{
    uint8_t           id;              /* id of fan                                */
    uint16_t          fan_speed;       /* max pwm 1000 -> 100%                     */
    bool              forced;          /* if TRUE, active fan with max value       */
    uint8_t           output_name;     /* Name of out put                          */
    double            setpoint;        /* setpoint fan, temp to regulate           */
    FAN_SETPOINT_ROLE role;            /* for what fan is used                     */
}Fan_def_t;



void vTaskCTRL_FAN();
void Set_SpeedFan(uint8_t speed);

double FAN_getWaterTemp(void);
double FAN_getLightTemp(void);

#endif /* _FAN_DEF_H */
